<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        .box {
            /* 宽度 */
            /* width: 100%; */
            font-size: 20px;
            width: 10em;
            /*  background-color: rgba(0, 0, 255, 0.1); */
            background-color: #2d7acd;
            /* opacity: 0.1; */
        }
    </style>
</head>

<body>
    <div class="box">div</div>
</body>

</html>